{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8dad68ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "def calXnew(Xold):\n",
    "    return(4+Xold) / (2 * Xold + 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b1151ecd",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "6448e397",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "finished the result is  1.4142155217241423\n"
     ]
    }
   ],
   "source": [
    "# 该模块是迭代公式的运算\n",
    "Xold = 0.1\n",
    "error = 0.00001\n",
    "i = 0\n",
    "maxIter = 50\n",
    "data = np.zeros((maxIter,4))                  #定义一个数组来进行数据储存\n",
    "\n",
    "while(i < maxIter):\n",
    "    \n",
    "    Xnew = calXnew(Xold)\n",
    "    difference = abs(Xnew - Xold)\n",
    "    i += 1\n",
    "    data[i,:]=[i,Xnew,Xold,difference]        #对迭代公式中的数据进行储存\n",
    "    if difference < error:\n",
    "        print(\"finished the result is \",Xnew)\n",
    "        break\n",
    "    Xold = Xnew\n",
    "\n",
    "    i += 1\n",
    "    data[i,:]=[i,Xnew,Xold,difference]       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "a7c3117e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "082b8537",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x19d50c3f9a0>]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYX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XgTtaAKsrPF5DAhYcgDGmLdAdmOVylOrwBHArEHM5R3VoD2QDr5QOEY00xqS6HSperLVrgceAVcB6YJu19jN3U1WbQ6y168HZuQKyKrsiFbjD7OW5hJtfaYypD4wFbrTWbnc7TzwZY84CNllr57mdpZoEgB7Ac9ba7kA+Vfird21TOg48BGgHNAdSjTGXuJuq9lOBO9YArSo8bkkC/PWtImNMEKe837TWvud2nmpwAnCOMWYlzhDYqcaYUe5Giqs1wBprbdnfnMbgFHqiGAD8ZK3NttaGgfeA413OVF02GmOaAZTebqrsilTgjjnA4caYdsaYJJwvTz50OVPcGGMMztjpEmvt427nqQ7W2justS2ttW1x/vtNttYmzB6ctXYDsNoY07H0qf7AYhcjxdsqoI8xJqX0z2t/EuhL2t18CAwrvT8M+KCyKwrEJY7HWWsjxpjrgQk4336/bK1d5HKseDoBuBRYYIz5pvS5O621n7oXSSrhT8CbpTsZK4ArXM4TN9baWcaYMcB8nFlTX5MAh9QbY0YD/YAMY8waYDjwCPCOMeYqnF9cF1R6/TqUXkTEmzSEIiLiUSpwERGPUoGLiHiUClxExKNU4CIiHqUCFxHxKBW4iIhH/T/Rvkz6xkFyEAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(data[:i,1],data[:i,2])               #利用储存的数据数组，可以勾画出规律曲线\n",
    "x = np.arange(-0.9,10,0.1)                    #然后再添加y = x和 y = 1/ (x+1) + 1两条函数，即可得到完整图像\n",
    "y1 = x\n",
    "plt.plot(x,y1)\n",
    "y2 = 1/(x+1) + 1\n",
    "plt.plot(x,y2)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
